package com.yao.fin.enums;

import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;
import lombok.Setter;

import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @author yaoyuming
 * @date 2020/03/13 9:23
 */
@Getter
public enum LabelEnum {
    ZJ(1, "中级"),
    SWS(2, "税务师"),
    CPA(3, "注会CPA");

    private final int code;
    private final String desc;

    LabelEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    private static Map<Integer, String> enums = Stream.of(LabelEnum.values()).collect(Collectors.toMap(LabelEnum::getCode, LabelEnum::getDesc));

    public static String getDesc(int code){
        return enums.get(code);
    }

}
